Revert "nvmet-tcp: Don't free SQ on authentication success"#746
Revert "nvmet-tcp: Don't free SQ on authentication success"#746blktests-ci[bot] wants to merge 2 commits intolinus-master_basefrom
Conversation
|
Upstream branch: d60bc14 |
|
Upstream branch: d60bc14 |
fc834da to
21c3d92
Compare
|
Upstream branch: d60bc14 |
21c3d92 to
a9ad33d
Compare
6b4d829 to
ceec5ed
Compare
|
Upstream branch: b4e0758 |
a9ad33d to
abb4f27
Compare
ceec5ed to
3b54e52
Compare
|
Upstream branch: 6596a02 |
abb4f27 to
5f26abf
Compare
3b54e52 to
6a0b974
Compare
|
Upstream branch: 507bd4b |
5f26abf to
08e879e
Compare
6a0b974 to
59ca59b
Compare
|
Upstream branch: dd6c438 |
08e879e to
3744682
Compare
94f0438 to
857ada9
Compare
|
Upstream branch: dd6c438 |
In an attempt to fix REPLACETLSPSK we stopped freeing the secrets on successful connections. This resulted in memory leaks in the kernel, so let's revert the commit. A improved fix is being developed to just avoid clearing the tls_key variable. This reverts commit 2e6eb6b. Signed-off-by: Alistair Francis <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Chris Leech <[email protected]>
Curently after the host sends a REPLACETLSPSK we free the TLS keys as part of calling nvmet_auth_sq_free() on success. This means when the host sends a follow up REPLACETLSPSK we return CONCAT_MISMATCH as the check for !nvmet_queue_tls_keyid(req->sq) fails. A previous attempt to fix this involed not calling nvmet_auth_sq_free() on successful connections, but that results in memory leaks. Instead we should not clear `tls_key` in nvmet_auth_sq_free(), as that was incorrectly wiping the tls keys which are used for the session. This patch ensures we correctly free the ephemeral session key on connection, yet we don't free the TLS key unless closing the connection. Signed-off-by: Alistair Francis <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Chris Leech <[email protected]>
3744682 to
73fc81e
Compare
Pull request for series with
subject: Revert "nvmet-tcp: Don't free SQ on authentication success"
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1082258